GRAVITATIONAL LENSER 1.3
Copyright 1997 by Leos Ondra

The  Gravitational  Lenser  1.3  is a free plug-in for Adobe Photoshop
(version 3.0x and above) and Windows, created with the Filter Factory.
It  simulates  gravitational  lensing  by  a  point  mass in the usual
weak-field,  small-angle, and thin-screen approximation. It works only
with RGB (16-million-colors) images.

Compared  to  the  previous  version  (1.2) the filter is much faster,
thanks to code improvements made by Kangaroo and Mario Klingemann.

Built-in sliders can be used to adjust the position of the lens within
an  image,  the Einstein radius and the RGB color of the Einstein ring
and the  undefined area around the lens, where the filter tries to map
the region outside the image's edges.

The source code of the Gravitational Lenser 1.3:

R:

put(x-val(0,0,X),0),put(y-val(1,Y,0),1),
put(get(0)*get(0)+get(1)*get(1),2),
put(val(2,0,min(X/2,Y/2)),6),
put(get(0)*get(6)*get(6)/get(2),3),
put(get(1)*get(6)*get(6)/get(2),4),
put(sqr(get(2))==get(6) || get(2)==0 || (x-get(3) > X)
|| (x-get(3) < 0) || (y-get(4) > Y) || (y-get(4) < 0),5),
get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)

G:

get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)

B:

get(5) ? ctl(3+z) : src(x-get(3),y-get(4),z)

Slider 0 : Lens position (x)  range : [0,X]
Slider 1 : Lens position (y)  range : [Y,0]
Slider 2 : Einstein radius    range : [0,min(X/2,Y/2)]
Slider 3 : Color (R)          range : [0,255]
Slider 4 : Color (G)          range : [0,255]
Slider 5 : Color (B)          range : [0,255]

where   X  and  Y  is  the  image's  width  and  height  (in  pixels),
respectively.

More detailed desctiption of the Gravitational Lenser 1.3 can be found
at http://www.sci.muni.cz/~ondra/grlens/grl0.html.

The archive grlens13.zip contains the following files:

1, grlens13.txt  This file
2, grlens13.afs  The source file for the Filter Factory
3, grlens13.8bf  The filter itself, compiled for Windows

No  warranties  are given. Distribution of Gravitational Lenser 1.3 is
allowed  as  long as the file grlens13.8bf is left intact and free for
the  ultimate user. Commercial redistribution without prior consent of
the author is forbidden.

Leos Ondra
Skretova 6, 621 00 Brno, Czech Republic
ondra@physics.muni.cz

October 30, 1997